home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
476-500
/
disk_500
/
wiconify
/
wiconsetter.lzh
/
wInfo2Icon
/
wInfo2Icon.doc
< prev
next >
Wrap
Text File
|
1991-04-19
|
4KB
|
81 lines
OVERVIEW:
WINFO2ICON is a companion program to WICONIFY and WICONSETTER. It converts
Workbench .info files into icon files that can be used by wIconSetter or
wIconify. wInfo2Icon will automatically write the IMAGE, SELECT and MASK
commands and data that correspond to the imagery for any Workbench icon.
HOW TO USE WINFO2ICON:
To convert a Workbench icon to a wIconify icon, simply issue the command
1> wInfo2Icon <infofile> <iconfile>
where <infofile> is the name of the .info file (the '.info' is added
automatically by wInfo2Icon), and <iconfile> is the name of the icon file to
be created.
wInfo2Icon will read the .info file and extract the icon's imagery. It will
convert this to the appropriate format for wIconSetter and wIconify, and
produces a text file containing the imagery. You may edit this text file to
include additional commands, or to modify the icon images.
The Workbench supports four different kinds of icons: ones that are
complemented when selected, ones that are complemented with the backgound
color flood-filled around the edges of the image, ones that have
separate select images, and ones that have no highlighting at all. Each of
these types is treated differently to achieve the same result in wIconify.
The first type is implemented simply by providing an IMAGE command and data
that represents the icon image. wIconify automatically uses complement
select mode.
The second type uses an IMAGE command and a MASK command. wIconify uses the
mask to determine what to complement, and what part of the image is "active":
you must click within the mask area in order to register a "hit" on the icon.
The third type is implemented with an IMAGE and SELECT command, to give the
icon a different image when selected. In addition, a MASK is also used to
remove the background pixels when you drag the icon around (if these pixels
were not removed, it would look like you were dragging part of the backgound
around as well). Note that the Workbench does not remove these pixels, so
the wIconify icons should look slightly better when you move them. If you
want the effect to be exactly like the Workbench icons, simply use a text
editor to remove the MASK command and its data from the file.
Finally, the fourth type is implemented using an IMAGE and SELECT command,
both with the same data. Thus the selected version of the icon will be the
same as the unselected image. As in the case above, wInfo2Icon also
supplies a MASK command to make moving the icon look a little better. If
you do not want this mask, simply remove it using any text editor.
Note that many Workbench icons have an extra row of pixels on the bottom
(to separate the icon's name from the icon's image). Since wIconify adds
one pixel above the icon name automatically, this is unnecessary for icons
that will be used with wIconify. You may want to remove these blank lines
from the icons files created by wInfo2Icon using a text editor. If you do,
be sure to remove them from ALL the images (SELECT and MASK images, too).
Once you have created the icon files, you can include them into the
wIconSetter initialization file via the ICON: FROM <file> command, or by
copying the data directly into the initialization file itself. To use the
icon file as the default image for wIconify, use the DEFAULT_ICON: <file>
command in the wIconify.Init file.
Note that Workbench icons are allowed to be almost any size, but wIconify
icons are limited to 78 by 32 pixels in size. Despite this limitation,
wInfo2Icon will write files that are as large as the original icons, in most
cases.
AUTHOR:
Davide P. Cervone
Mathematics Department
Brown University
Providence, Rhode Island 02912
ST402523@BROWNVM